In this recipe we look into more mouse events.(If you've seen The Mobile Mouse I, this is going to look very familiar!)
Move the mouse cursor over the images!
Discussion
In The Mobile Mouse I, we learned how to use the onMouseOver() event to trigger changes to a web page whenever the mouse cursor moved over certain areas. What we didn't have was an easy way to "change it back" when the mouse cursor exited one of those areas. This recipe does just that, with the Netscape 3.0+ and Internet Explorer 4.0+ onMouseOut() event.Where anchor tag content in The Mobile Mouse I was (leaving out unnecessary details)
<A HREF="" onMouseOver="Describe('...')">...</A>in this recipe we add another event:<A HREF="" onMouseOut="CleanIt()" onMouseOver="Describe('...')">...</A>(we underlined the new bit to make it more visible).onMouseOut() can be used by itself if you like, and you don't need to use it only to "undo" the results of onMouseOver().
Copyright ©1998 by Charles River Media, All Rights Reserved